Skip to content

CLN: memory_map do not silently fail #44777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2021
Merged

CLN: memory_map do not silently fail #44777

merged 1 commit into from
Dec 6, 2021

Conversation

twoertwein
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

)
# error: "BaseBuffer" has no attribute "close"
handle.close() # type: ignore[attr-defined]
handles.remove(handle)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user opened a file, this would cause an error (it is not in handles).

@@ -699,15 +699,15 @@ def test_encoding_mmap(memory_map):
GH 23254.
"""
encoding = "iso8859_1"
data = BytesIO(" 1 A Ä 2\n".encode(encoding))
df = read_fwf(
data,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never tested memory_map since it silently failed.

@jreback jreback added Clean IO CSV read_csv, to_csv labels Dec 6, 2021
@jreback jreback added this to the 1.4 milestone Dec 6, 2021
@jreback jreback merged commit 0b0cac5 into pandas-dev:master Dec 6, 2021
@jreback
Copy link
Contributor

jreback commented Dec 6, 2021

thanks @twoertwein

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants